<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title>message-YuekeBlog</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" th:href="@{/res/layui/css/layui.css}">
	<link rel="stylesheet" th:href="@{/res/static/css/mian.css}">
</head>
<body class="lay-blog">
		<!--顶栏取自common里的fragment-->
		<div th:insert="~{front/commons/common::topBar(nav='message.html')}"></div>
		<!--中间栏：内容-->
		<div class="container-wrap">
			<div class="container container-message">
				<div class="contar-wrap" id="contar-wrap">
					<form class="layui-form" th:action="@{/newMessage}">
						<div class="layui-form-item layui-form-text">
							  <textarea name="message" class="layui-textarea" style="resize:none"></textarea>
						</div>
						<div class="item-btn">
							<input type="submit" class="layui-btn layui-btn-normal" id="item-btn" value="好了">
						</div>
					</form>
					<div id="LAY-msg-box">
						<div class="info-box" th:each="message:${messageList}">
							<div class="info-item">
								<img class="info-img" th:src="@{/res/static/images/info-img.png}" alt="">
								<div class="info-text">
									<p class="title count">
										<span class="name">匿名</span>
										<span class="info-img like"><i class="layui-icon layui-icon-praise"></i>5.8万</span>
									</p>
									<p class="info-intr" th:text="${message.getMessage()}">父爱如山，不善表达。回想十多年前，总记得父亲有个宽厚的肩膀，小小的自己跨坐在上面，越过人山人海去看更广阔的天空，那个时候期望自己有一双翅膀，能够像鸟儿一样飞得高，看得远。虽然父亲有时会和自己开玩笑，但在做错事的时候会受到严厉的训斥。父亲有双粗糙的大手掌。</p>
								</div>
							</div>
						</div>
					</div>

					<!--<div id="test1" class="paging"></div>-->
				</div>
			</div>
		</div>
		<!--底栏，取自common里的fragment-->
		<div th:insert="~{front/commons/common::bottomBar}"></div>
		<script th:src="@{/res/layui/layui.js}"></script>
	<script>		
		layui.config({
			base: '/res/static/js/'
		}).use('blog');
	</script>

	<script id="LAY-msg-tpl" type="text/html">
		<div class="info-box">
			<div class="info-item">
				<img class="info-img" src="{{ d.avatar }}" alt="">
			  <div class="info-text">
					<p class="title">
					  <span class="name">{{ d.username }}</span>
					  <span class="info-img">
					  	<i class="layui-icon layui-icon-praise"></i>
					  	{{ d.praise }}
					 	</span>
					</p>
					<p class="info-intr">
						{{ d.content }}
					</p>
			  </div>
			</div>
		</div>
	</script>

</body>
